1. Field
The present invention relates to an image interpolation apparatus and A computer readable storage medium storing instructions of a computer program.
2. Description
A contact image sensor (CIS) is used as an image scanner for an image forming device (MFP) such as a copy machine, a facsimile machine and a scanner. The contact image sensor is formed by CCD (Charge Coupled Device). The contact image sensor is a sensor having a same magnification. Therefore, the contact image sensor preferably has a length which is longer than a length of a paper to be scanned. In general, an image scan sensor is formed by connecting some contact image sensors on a printed circuit board.
However, since an interval between two adjacent contact image sensors becomes shorter with increasing resolution, a pixel which exists between the contact image sensors may miss being scanned.
FIG. 21 is a figure illustrating an image scan sensor which is formed by connecting some contact image sensors, which each contact image sensor has CCD on a printed circuit board.
In FIG. 21, a first contact image sensor 10a and a second contact image sensor 10b are connected to provide an image scan sensor 10. Number of the contact image sensors is not limited to two and it may be more than three. The pixel which exists between the contact image sensors is interpolated by an operation. Image scan elements 20 are arranged with an interval in a line in each contact image sensor 10a, 10b. 
The image scan elements 20 are corresponding pixels a1-a9, respectively. A missing pixel X exists between the contact image sensors 10a and Mb. In FIG. 21, pixels a1-a9 and pixels b1-b9 which are respectively located on both sides of the missing pixel X are illustrated.
One of techniques to interpolate the missing pixel X is disclosed in JP-A 2007-142667 (KOKAI). In this reference, a determination unit determines whether the missing pixel is located in a halftone dot area or a non-halftone dot area.
If the determination unit determines that the missing pixel is located in the non-halftone dot area, the missing pixel is interpolated by a linear interpolation. On the other hand, if the determination unit determines that the missing pixel is located in the halftone dot area, the missing pixel is interpolated by a pattern matching.
This reference adopts a method described in JP-A PH8-149291(KOKAI) to determine whether the missing pixel is located in the halftone dot area or the non-halftone dot area. However, this method may cause increasing a size of the image forming device and cost.
Moreover, in the JP-A 2007-142667 (KOKAI), a missing pixel in a basic pattern is replaced to a corresponding pixel (edge pixel) in a comparative pattern as a temporal interpolation pixel before operating the pattern matching. However, since difference of signal levels between the basic pattern and the comparative pattern is not considered, accuracy of the temporal interpolation pixel is low. Also, since accuracy of the pattern matching is low, an interpolation pixel after the pattern matching may stray from a true pixel.
Accordingly, an object of the invention is to provide an image interpolation apparatus that the missing pixel is interpolated with higher accuracy without the determination unit which determines whether the missing pixel is located in the halftone dot area or the non-halftone dot area.
Moreover, other object of the invention is to provide an image interpolation apparatus that improves accuracy of the pattern matching by replacing the missing pixel in the basic pattern to the temporal interpolation pixel which is calculated from the signal levels and variation of the signal levels based on pixels around the missing pixel in the basic pattern and the comparative pattern.